Coding Basics
Computers are fast. But they can only do exactly what you tell them. This means that small errors (such as typos) can cause errors as a computer doesn’t know that you meant to type “mean” when you typed “mena”.
My Coding Principles
- Organize your files!
- See 1
- Know what you’re doing before you do it
- If you don’t put comments in your code you will have no idea how it works when you come back to it
- Simple is better - unless you have to optimize something, don’t spend hours making something slick and fast
- Don’t waste time solving a future problem (i.e. don’t make something generic if you don’t have to)
- If you have to do something multiple times, write a function or a loop